package com.center.biz.impl;

import com.center.api.model.EduClass;
import com.center.api.remote.RemoteEduClassService;
import com.center.biz.dao.EduClassMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0",interfaceClass = RemoteEduClassService.class)
public class RemoteEduClassServiceImpl implements RemoteEduClassService {

    @Autowired
    private EduClassMapper eduClassMapper;

    @Override
    public int delete(int id) {
        return eduClassMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int saveArticle(EduClass eduClass) {
        return eduClassMapper.insertSelective(eduClass);
    }

    @Override
    public EduClass getById(int id) {
        return eduClassMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<EduClass> list(EduClass eduClass) {
        return eduClassMapper.list(eduClass);
    }

    @Override
    public int update(EduClass eduClass) {
        return eduClassMapper.updateByPrimaryKeySelective(eduClass);
    }
}
